home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tpmul221.zip / MULAWARE.INT < prev    next >
Text File  |  1992-03-02  |  2KB  |  63 lines

  1. UNIT MulAware;
  2. {
  3.   Multitasking Routines for TP 6.0
  4.  
  5.   Copyright (c) 1991,1992 A.B.S. - ALL RIGHTS RESERVED
  6.  
  7.   2.00  First Distributed Release
  8.   2.10  Fixed Windows Checking
  9.   2.11  Took out VMiX Code
  10.   2.20  Fixed DDOS Code - Locking up Novell
  11.   2.21  Fixed Code - Tried to be too smart for my own good
  12. }
  13.  
  14. {B-,D-,F+,I-,O-,R-,S-,V-}
  15.  
  16. INTERFACE
  17.  
  18. CONST
  19.   MultiTasker   : Boolean = True;
  20.   DV_Loaded     : Boolean = False; {DESQview 2.26+}
  21.   TV_Loaded     : Boolean = False; {DV 2.00-2.25, TaskView, TopView, OmniView,
  22.                                     & clones}
  23.   DDOS_Loaded   : Boolean = False; {DoubleDOS}
  24.   WIN386_Loaded : Boolean = False; {Windows in 386enh mode}
  25.   
  26. PROCEDURE TimeSlice;
  27. {Gives up one Time Slice, call while polling the keyboard for input,
  28.  has no effect if a multitasker is not present}
  29.  
  30. PROCEDURE PreventSwitching;
  31. {Prevents Task Switching until ResumeSwitching is called, used for
  32.  critical code, don't leave on for too long!, has no effect if a
  33.  multitasker is not present}
  34.  
  35. PROCEDURE ResumeSwitching;
  36. {Resumes Task Switching, has no effect if a multitasker is not present}
  37.  
  38. FUNCTION MulVersion : Word;
  39. {Returns the Version Number for TopView, DESQview 2.26+, and Win386, 0 for all
  40.  others or none, OmniView - who knows}
  41.  
  42. FUNCTION VirtualBuffer : Word;
  43. {Returns the Virtual Buffer for Direct Screen Writes
  44.  Should only be called once for DESQview & TV, should be called
  45.  EVERY write for DDOS, returns 0 if no multitasker is present}
  46.  
  47. PROCEDURE TV_UpdateBuffer(Num : Word; Buffer, CharOffset : Word);
  48. {Updates the screen from the virtual buffer.  Num is the number of
  49.  sequential characters that have been modified.  Buffer is the VirtualBuffer.
  50.  CharOffset is the offset of the first character modified.  Do NOT call with
  51.  Num = 0!  Only needed for TV, DESQview will discontinue the automatic screen
  52.  updating if this is called!, might crash if TV/DV is not present!}
  53.  
  54. FUNCTION DDOS_Visible : Boolean;
  55. {Returns True if the current task is the visible task, might crash if
  56.  DDOS_Loaded is False!}
  57.  
  58.  
  59. IMPLEMENTATION
  60.  
  61.  
  62. END.
  63.